Widespread uptake of potent antiretroviral therapy (ART) for HIV holds the promise of reducing morbidity and HIV transmission - but requires consistent engagement with the health care system. South Africa has the largest ART program in the world, with 2.4 million people on treatment. Yet despite this unprecedented accomplishment, UNAIDS estimates that ~60% of people in South Africa in need of treatment are still not accessing ART. This reflects attrition from the multiple critical steps on the path fom HIV testing to linkage to HIV care to lifelong ART and virologic suppression. Previous research on patient attrition from the HIV care cascade has focused on cross-sectional snapshots of points on the care continuum. This approach fails to capture long-term, dynamic patient movement into and out of the cascade. Improvement in each step of the continuum must be achieved together to improve overall rates of virologic suppression and survival. Only by understanding patient, structural, and geographic factors that contribute to suboptimal progression through the continuum of care can we design effective interventions that target those at highest risk for poor care engagement. Innovative means of assessing patient progression longitudinally and across different treatment sites are needed to assess the dynamic, non-linear nature of the HIV care continuum. Leveraging a well-characterized cohort of nearly 2,000 HIV-infected people drawn from an NIMH- funded trial in South Africa (R01MH090326), we will assess 5-year HIV care trajectories, characterizing patients via group-based statistical modeling based on a combination of national laboratory data and death registry information. Because cohort study subjects were consented prior to HIV testing, in a variety of clinical sites and with a wide spectrum of presenting CD4 counts, we will be able to characterize risk factors for different long-term trajectories for a wide variety of patient types. In addition,we will define geographic areas associated with poor engagement in care using spatial analysis of care trajectories and 2011 South African census data. We propose the following three specific aims: (1) To assess rates and sociobehavioral predictors of 5-year mortality following HIV testing adjusting for baseline and 9-month clinical factors, (2) To identify distinct long-term HIV care trajectories based on the pattern of CD4 counts and viral loads (such as in care, care interrupters, and not in care) and to assess sociobehavioral factors associated with membership in one of these trajectories, and (3) To use geographic information system and spatial statistical analysis to identify hot spots associated with a higher likelihood of inconsistent long-term HIV care trajectories and higher mortality. This study will be among the first to examine longitudinal engagement in care for people newly- diagnosed with HIV. Our novel approach will help researchers and policymakers craft effective interventions targeting sub-populations of HIV-infected individuals and geographic areas with a higher likelihood of poor HIV care engagement. These findings can improve HIV care at the individual, program and community levels.